package com.frxuexi.park2209.adapter

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.base.entity.NoticeBeanItem
import com.frxuexi.park2209.R

class NoticeAdapter2:BaseMultiItemQuickAdapter <NoticeBeanItem,BaseViewHolder>(){
    init {
        addItemType(0,R.layout.item_notice)
        addItemType(1,R.layout.item_notice2)
    }
    override fun convert(helper: BaseViewHolder, item: NoticeBeanItem) {
        if(item.type==0) {
            helper.setText(R.id.notice_title, item.noticeTitle)
            helper.setText(R.id.notice_content, item.noticeValue)
            helper.setText(R.id.notice_uid, item.noticeId.toString())
        }else{
            helper.setText(R.id.notice_title2, item.noticeTitle)
            helper.setText(R.id.notice_content2, item.noticeValue)
            helper.setText(R.id.notice_uid2, item.noticeId.toString())
        }
    }
}